function dF = ffunAlpha(V,F,alpha, r, gamma ,Lambda, phi,q,aBar,delta)
        

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% Analogous to ffunODE but allowing for alpha\not=0 %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Procedure: Calculate F''(V), given V, F(V), F'(V)
        dF=zeros(2,1);
        dF(1)=F(2);
        
        F1=F(1);
        
        a=(1+alpha*q)*(F1-dF(1)*V)-phi*(gamma-r)/(1+alpha*q)-dF(1)*phi/(1+alpha*q);
        a=a/max(0.001,phi+2*dF(1)*alpha*phi/(1+alpha*q));

        if (a<0)
            
            a=0;
          
            
        end
        
        if (a>aBar)
            
            a=aBar;
           
            
        end

       W=phi*a/(1+alpha*q);


        if (W>F1)

            W=F1;
            a=W*(1+alpha*q)/phi;
            lambda=Lambda-a-q-alpha*a*q;
            dV=(gamma+lambda+delta)*V-W*(1+alpha*a);
            dF(2)=(dF(1)^2-dF(1)*F1/phi+dF(1)^2*V/phi)/(min(dV,-0.0001));
            dF(2)=min(dF(2),-0.0001);

        else
        
            lambda=Lambda-a-q-alpha*a*q;
            W=phi*a;
            dV=(gamma+lambda+delta)*V-W*(1+alpha*a);
            
            dF(2)=-(gamma+delta-r)*dF(1)/(min(dV,-0.0001));
            dF(2)=min(dF(2),-0.0001);
            
        end

end